package com.china.lottery.listener.service;

import java.io.IOException;
//import java.net.URISyntaxException;
import java.net.URISyntaxException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.io.IOUtils;

import com.china.lottery.listener.util.Constant;


@SuppressWarnings("serial")
public class bjjcAwardAction  extends HttpServlet {
	
	//http://19500.xicp.io:7019/ListenerAdmin/bjjcAward.servlet
	//http://192.168.1.21:8048/ListenerAdmin/bjjcAward.servlet
//	WebClientEnum.initClient(new MsgWebSocketClient("ws://172.16.0.48:6162/"),requestText);
	
//	private MsgWebSocketClient MsgWebSocketClient ;
	protected void service(HttpServletRequest request,
			HttpServletResponse response) throws IOException  {
		String requestText = IOUtils.toString(request.getInputStream(),"UTF-8");
		 
//		WebClientEnum.initClient(MsgWebSocketClient,requestText);

		response.getWriter().print("success");
			    //http://124.77.185.112:7019/ListenerAdmin/bjjcAward.servlet
	}

//	public void init() throws ServletException {
//		// TODO Auto-generated method stub
//		try {
//			MsgWebSocketClient = new MsgWebSocketClient("ws://172.16.10.64:6162/");
//		} catch (URISyntaxException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
//	}
	
	protected void doGet(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		this.service(request, response);
	}

	protected void doPost(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		this.service(request, response);
	}

}
